<template>
	<view style="padding-top: 300rpx;">
		<view class="item" v-if="type == 1">
			<view class="img">
				<image src="/static/order/suc.png" mode=""></image>
			</view>
			<view class="txt">恭喜您支付成功</view>
		</view>
		<view class="item" v-else>
			<view class="img">
				<image src="/static/order/errer.jpg" mode=""></image>
			</view>
			<view class="txt">已取消支付</view>
		</view>
		<button :class="type == 1 ? 'back' : avtive" open-type="launchApp" :app-parameter="type" >返回APP</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:'',
				avtive:'back active'
			};
		},
		onLoad(options) {
			this.type = options.type
		}
	}
</script>

<style lang="scss" scoped>
	.item{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		margin-bottom: 60rpx;
		.img{
			width:200rpx;
			height: 200rpx;
			margin-bottom: 20rpx;
			image{
				width: 100%;
				height: 100%;
			}
		}
		.txt{
			font-size: 32rpx;
			font-weight: 600;
		}
	}
	.back{
		width: 70vw;
		border-radius: 100rpx;
		background-color: $uni-color-success;
		color: #fff;
	}
	.active{
		background-color: $uni-color-warning;
	}
</style>
